package com.itheima.Demo;

import com.itheima.Utils.MybatisUtils;
import com.itheima.dao.OrderMapper003;
import com.itheima.pojo.Order;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.junit.Test;

public class demo01 {
    @Test
    public void demo01(){
        SqlSessionFactory sqlSessionFactory = MybatisUtils.getSqlSessionFactory();
        SqlSession sqlSession = MybatisUtils.getSqlSession();
        OrderMapper003 mapper = sqlSession.getMapper(OrderMapper003.class);
        Order order = mapper.find(1);
        System.out.println(order);
        sqlSession.close();
    }
}
